<!-- <!DOCTYPE html>
<html>

</html> --><!DOCTYPE html>
<html>

<head>
  <!-- Meta, title, CSS, favicons, etc. -->
  <meta charset="utf-8">
  <title>AbsoluteAdmin - A Responsive Boostrap 3 Admin Dashboard</title>
  <meta name="keywords" content="Bootstrap 3 Admin Dashboard Template Theme" />
  <meta name="description" content="AdminDesigns - Bootstrap 3 Admin Dashboard Theme">
  <meta name="author" content="AdminDesigns">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">


   {include file="public/import_file" /}

</head>
 <script>
          function all_checked() {
                var all_check = document.getElementById("allCheck");
              var check=document.getElementsByName("Check[]");
                if (all_check.checked) {
                    for(j=0;j<check.length;j++){
                        check[j].checked=1;
                    }
                } else {
                    for(j=0;j<check.length;j++){
                        check[j].checked=0;
                    }
                }
             }
          

           function delcheck(){

            var check=document.getElementsByName("Check[]");
            var flag=0;
            var dels="";
             for(j=0;j<check.length;j++){
                  if(check[j].checked)
                  {
                      flag=1; 
                      dels=dels+check[j].value+",";  
                  }
              }
              if(flag==0)
              {
                  alert("请选择信息后删除！")
                  return false;
              }
              else
              {
                //去掉最后一个逗号

                  dels=dels.replace(/,$/,"");
                  var path="__APP__/Admin/Recommend/delchecks?id="+dels;
                  location.href=path;
                  
              }
          }
    </script>

<body class="messages-page">

 

  <!-- Start: Main -->
  <div id="main">

    <!-- Start: Header -->
       {include file="public/header" /}
    <!-- End: Header -->

    <!-- Start: Sidebar -->
    <aside id="sidebar_left" class="nano nano-light affix">

      <!-- Start: Sidebar Left Content -->
      <div class="sidebar-left-content nano-content">

       
        <!-- Start: Sidebar Menu -->
        {include file="public/menu" /}
        <!-- End: Sidebar Menu -->

	      <!-- Start: Sidebar Collapse Button -->
	      <div class="sidebar-toggle-mini">
	        <a href="#">
	          <span class="fa fa-sign-out"></span>
	        </a>
	      </div>
	      <!-- End: Sidebar Collapse Button -->

      </div>
      <!-- End: Sidebar Left Content -->

    </aside>

    <!-- Start: Content-Wrapper -->
    <section id="content_wrapper">

     
      <!-- Start: Topbar -->
      <header id="topbar" class="alt">
        <div class="topbar-left">
          <ol class="breadcrumb">
            <li class="crumb-active">
              <a href="#" style="font-weight: bold;">餐厅管理员信息管理</a>
            </li>
            <li class="crumb-icon">
              <a href="dashboard.html">
                <span class="glyphicon glyphicon-user"></span>
              </a>
            </li>
            
            <li class="crumb-trail">管理员列表</li>
          </ol>
        </div>
        
      </header>
      <!-- End: Topbar -->

      <!-- Begin: Content -->
      <section id="content" class="animated fadeIn">

        <div class="row">

          <!-- message tray -->
          <!-- <div class="col-md-3 message-tray animated fadeIn"> -->

            <!-- quick compose button -->
           <!--  <button type="button" id="quick-compose" class="btn btn-danger light btn-block compose-btn">发邮件</button> -->

            <!-- message tray panel -->
            <!-- <div class="panel">
              <div class="panel-body p10">
 -->
                <!-- Message Menu -->
                <!-- <div class="list-group list-group-links">
                  <div class="list-group-header pb5 br-n">推荐类型</div>
 -->
                  <!-- Browser List -->
                <!-- <div class="panel" id="p18">
                  
                  <div class="panel-body pn">
                    <table class="table mbn tc-med-1 tc-bold-2">                    
                      <tbody>
                      <volist name="recmdtype" id="vo">
                        <tr>
                         
                        </tr>
                        </volist>
                      </tbody>
                    </table>
                  </div>
                </div>

                </div>

               
              </div>
            </div>
          </div>
 -->
          <!-- message listing panel -->
          <div class="col-md-9 animated fadeIn" style="width: 100%">
          
            <div class="panel">

              <!-- message toolbar header -->
              <div class="panel-menu">
                <div class="row">
                  <div class="hidden-xs hidden-sm col-md-3">
                    <div class="btn-group">
                        <button type="button" class="btn btn-default light" onclick="delcheck()">
                          <i class="fa fa-trash"></i>
                        </button>

                        <button type="button" class="btn btn-default light" id="quick-compose" title="添加">
                          <i class=" fa fa-plus"></i>
                        </button>

                       
                    </div>            

                  </div>
                  <div class="col-xs-12 col-md-9 text-right">
                    <button type="button" class="btn btn-danger light visible-xs-inline-block mr10">Compose</button>
                    <!-- <span class="hidden-xs va-m text-muted mr15"> Showing
                      <strong>15</strong> of
                      <strong>253</strong>
                    </span> -->
                    <!-- <div class="btn-group mr10">
                      <button type="button" class="btn btn-default light hidden-xs">
                        <i class="fa fa-star"></i>
                      </button>
                      <button type="button" class="btn btn-default light hidden-xs">
                        <i class="fa fa-calendar"></i>
                      </button>
                      <button type="button" class="btn btn-default light">
                        <i class="fa fa-trash"></i>
                      </button>
                    </div> -->
                    <div class="btn-group mr10">
                      <div class="btn-group">
                        <button type="button" class="btn btn-default light dropdown-toggle ph8" data-toggle="dropdown">
                          <span class="fa fa-tags"></span>
                          <span class="caret ml5"></span>
                        </button>
                        <ul class="dropdown-menu pull-right" role="menu">
                          <li>
                            <a href="#">Work</a>
                          </li>
                          <li>
                            <a href="#">Important</a>
                          </li>
                          <li>
                            <a href="#">Favorites</a>
                          </li>
                          <li class="divider"></li>
                          <li>
                            <a href="#">
                              <span class="fa fa-plus pr5"></span> Create New</a>
                          </li>
                        </ul>
                      </div>
                      <div class="btn-group">
                        <button type="button" class="btn btn-default light dropdown-toggle ph8 br-tp-left" data-toggle="dropdown">
                          <span class="fa fa-folder"></span>
                          <span class="caret ml5"></span>
                        </button>
                        <ul class="dropdown-menu pull-right" role="menu">
                          <li>
                            <a href="#">Work</a>
                          </li>
                          <li>
                            <a href="#">Important</a>
                          </li>
                          <li>
                            <a href="#">Favorites</a>
                          </li>
                          <li class="divider"></li>
                          <li>
                            <a href="#">
                              <span class="fa fa-plus pr5"></span> Create New</a>
                          </li>
                        </ul>
                      </div>
                    </div>
                    <div class="btn-group">
                      <button type="button" class="btn btn-default light">
                        <i class="fa fa-chevron-left"></i>
                      </button>
                      <button type="button" class="btn btn-default light">
                        <i class="fa fa-chevron-right"></i>
                      </button>

                    </div>
                  </div>
                </div>
              </div>

              <!-- message listings table -->
              <div class="panel-body ">
                <table class="table" style="text-align: center;">
                  <thead >
                    <tr>
                      <th class="text-center"><input type="checkbox" id="allCheck" onchange="all_checked()">全选</th>
                      <th class="text-center">管理员ID</th>
                      <th class="text-center">管理员名称</th>
                      <th class="text-center">所属餐厅</th>
                      <th class="text-center">联系电话</th>
                      <th class="text-center">账号状态</th>
                      <th class="text-center">操作</th>
                    </tr>
                  </thead>
                  <tbody>
                   {volist name="shopadminsres" id="vo"}     
                    <tr class="message-unread">
                     <td class="hidden-xs">
                        <label class="option block mn">
                          <input type="checkbox"  name="Check[]" value="{$vo.id}">
                          <span class="checkbox mn"></span>
                        </label>
                     </td>
                     <td>{$vo.id}</td>
                     <td>{$vo.adminname}</td>
                     <td>{$vo.shopname}</td>
                     <td>{$vo.phone}</td> 
                     <td>{if condition="$vo['state'] eq 0  "}
                           <span class="badge  badge-system fs11">使用中</span>
                         {else /}
                           <span class="badge badge-warning  fs11">已禁用</span>
                          {/if}
                     </td>
                    
                     <td>
                       <a href="{:url('resetpass',array('id'=>$vo['id']))}" style="margin-right:5px;" title="重置密码"><i class="glyphicons glyphicons-rotation_lock"></i></a>
                       {if condition="$vo['state'] eq 0"}
                        <a href="{:url('changestate',array('id'=>$vo['id'],'state'=>1))}" style="margin-right:5px;" title="暂停使用"><i class="imoon imoon-cancel-circle"></i></a>
                       {else /}
                        <a href="{:url('changestate',array('id'=>$vo['id'],'state'=>0))}" style="margin-right:5px;" title="取消禁用"><i class="imoon imoon-checkmark-circle"></i></a>
                       {/if}
                       <a href="{:url('del',array('id'=>$vo['id']))}" title="删除"><i class="fa fa-trash"></i></a>
                     </td>
                    </tr>
                   {/volist}
                  </tbody>
                </table>
                <!-- 分页 -->
                <div style="float: right;margin-right: 480px">{$shopadminsres->render()}</div> 
              </div>

            </div>
          </div>
        </div>

      </section>
      <!-- End: Content -->

    </section>

   

  </div>
  <!-- End: Main -->

  <!-- Admin Dock Quick Compose Message -->
  <div class="quick-compose-form">
    <form action="" method="post" id="editForm" enctype="multipart/form-data">
       
         <input type="text" name="adminname" id="inputStandard" class="form-control"  placeholder="用户名" required  />
         <input type="password" name="adminpass" id="inputStandard" class="form-control"  placeholder="密码" required  />
         <input type="text" name="phone" id="inputStandard" class="form-control"  placeholder="联系电话" required  />
        <!--  <input type="text" name="place" id="inputStandard" class="form-control"  placeholder="所在地" required  />
         <select name="rtype_rid" class="form-control">
                    <option value="0">推荐主题</option>
                    <option value="1">美食</option>
                    <option value="2">人文</option>
                    <option value="3">购物</option>  
                    <option value="4">游园观光</option>
                    <option value="5">娱乐休闲</option>
                    <option value="6">沙滩海岛</option>
                        </select> -->
        <!--  <textarea name="cause" class="form-control"  placeholder="简介" required ></textarea> -->
         <!-- <input type="text" name="cause" class="form-control"  placeholder="简介" required  /> -->
         <!-- <input type="file" name="pic" class="form-control" style="width: 200px;" title="主题图片"  /> -->

         <input type="submit" value="添加" class="btn btn-success light" style="float: right; margin-top: 10px; margin-right: 10px;" />
      </form>

  </div>

  <!-- BEGIN: PAGE SCRIPTS -->

  <!-- jQuery -->
  <script src="__PUBLIC__/static/index/vendor/jquery/jquery-1.11.1.min.js"></script>
  <script src="__PUBLIC__/static/index/vendor/jquery/jquery_ui/jquery-ui.min.js"></script>

  <!-- Summernote Plugin -->
  <script src="__PUBLIC__/static/index/vendor/plugins/summernote/summernote.min.js"></script>

  <!-- Theme Javascript -->
  <script src="__PUBLIC__/static/index/assets/js/utility/utility.js"></script>
  <script src="__PUBLIC__/static/index/assets/js/demo/demo.js"></script>
  <script src="__PUBLIC__/static/index/assets/js/main.js"></script>
  <script type="text/javascript">
  jQuery(document).ready(function() {

    "use strict";

    // Init Theme Core    
    Core.init();

    // Init Demo JS    
    Demo.init();

    var msgListing = $('#message-table > tbody > tr > td');
    var msgCheckbox = $('#message-table > tbody > tr input[type=checkbox]');

    // on message table checkbox click, toggle highlighted class
    msgCheckbox.on('click', function() {
      $(this).parents('tr').toggleClass('highlight');
    });

    // on message table row click, redirect page. Unless target was a checkbox
    msgListing.not(":first-child").on('click', function(e) {

      // stop event bubble if clicked item is not a checkbox
      e.stopPropagation();
      e.preventDefault();

      // Redirect to message compose page if clicked item is not a checkbox
      window.location = "pages_compose(alt).html";
    });

    // On button click display quick compose message form
    $('#quick-compose').on('click', function() {

      // Admin Dock Plugin
      $('.quick-compose-form').dockmodal({
        minimizedWidth: 260,
        width: 450,
        height: 300,
        title: '添加餐厅管理员',
        initialState: "docked",
        // buttons: [{
        //   html: "Send",
        //   buttonClass: "btn btn-primary btn-sm",
        //   click: function(e, dialog) {
        //     // do something when the button is clicked
        //     dialog.dockmodal("close");

        //     // after dialog closes fire a success notification
        //     setTimeout(function() {
        //       msgCallback();
        //     }, 500);
        //   }
        // }]
      });
    });

    // example email compose success notification
    function msgCallback() {
      (new PNotify({
        title: 'Message Success!',
        text: 'Your message has been <b>Sent.</b>',
        hide: false,
        type: 'success',
        addclass: "mt50",
        buttons: {
          closer: false,
          sticker: false
        },
        history: {
          history: false
        }
      }));
    };
    // Init Summernote
    $('.summernote-quick').summernote({
      height: 275, //set editable area's height
      focus: false, //set focus editable area after Initialize summernote
      toolbar: [
        ['style', ['bold', 'italic', 'underline', ]],
        ['para', ['ul', 'ol', 'paragraph']],
        ['height', ['height']],
      ]
    });

  });
  </script>
  <!-- END: PAGE SCRIPTS -->

</body>

</html>

